package com.ruoyi.guidance.service.impl;

import com.ruoyi.guidance.domain.HealthGuidance;
import com.ruoyi.guidance.mapper.HealthGuidanceMapper;
import com.ruoyi.guidance.service.IHealthGuidanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 健康指导Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-06
 */
@Service
public class HealthGuidanceServiceImpl implements IHealthGuidanceService 
{
    @Autowired
    private HealthGuidanceMapper healthGuidanceMapper;

    /**
     * 查询健康指导
     * 
     * @param healthId 健康指导主键
     * @return 健康指导
     */
    @Override
    public HealthGuidance selectHealthGuidanceByHealthId(Long healthId)
    {
        return healthGuidanceMapper.selectHealthGuidanceByHealthId(healthId);
    }

    /**
     * 查询健康指导列表
     * 
     * @param healthGuidance 健康指导
     * @return 健康指导
     */
    @Override
    public List<HealthGuidance> selectHealthGuidanceList(HealthGuidance healthGuidance)
    {
        return healthGuidanceMapper.selectHealthGuidanceList(healthGuidance);
    }

    /**
     * 新增健康指导
     * 
     * @param healthGuidance 健康指导
     * @return 结果
     */
    @Override
    public int insertHealthGuidance(HealthGuidance healthGuidance)
    {
        return healthGuidanceMapper.insertHealthGuidance(healthGuidance);
    }

    /**
     * 修改健康指导
     * 
     * @param healthGuidance 健康指导
     * @return 结果
     */
    @Override
    public int updateHealthGuidance(HealthGuidance healthGuidance)
    {
        return healthGuidanceMapper.updateHealthGuidance(healthGuidance);
    }

    /**
     * 批量删除健康指导
     * 
     * @param healthIds 需要删除的健康指导主键
     * @return 结果
     */
    @Override
    public int deleteHealthGuidanceByHealthIds(Long[] healthIds)
    {
        return healthGuidanceMapper.deleteHealthGuidanceByHealthIds(healthIds);
    }

    /**
     * 删除健康指导信息
     * 
     * @param healthId 健康指导主键
     * @return 结果
     */
    @Override
    public int deleteHealthGuidanceByHealthId(Long healthId)
    {
        return healthGuidanceMapper.deleteHealthGuidanceByHealthId(healthId);
    }
}
